Skip to content

Upgraded zip to v9 to fix security advisories - #49

Merged
0xnkr merged 2 commits into
0xnkr:mainfrom
SommerEngineering:zip-9
Oct 30, 2026
Merged

0xnkr merged 2 commits into
0xnkr:mainfrom
SommerEngineering:zip-9

Conversation

@SommerEngineering

Copy link
Copy Markdown

zip 8.6.0 is affected by five security advisories, which are all fixed in zip 9.0.5:

pptx-to-md only reads archives through ZipArchive and never extracts them, so the practical risk is low. Still, every project that depends on pptx-to-md gets these alerts as long as it requires zip 8.

This PR has two commits:

  1. Upgraded zip from 8.6.0 to 9.0.5. ZipFile::name() returns a Result in zip 9, so src/container.rs now propagates the error. Also added an Unreleased section to the changelog.
  2. Limited zip to the deflate compression, like docx-to-md does. PPTX and ODP files store their parts either uncompressed or deflated, so the other methods are never needed. This drops the dependencies for AES, bzip2, LZMA, PPMd, Zstandard, and Deflate64. If you prefer to keep the default features, feel free to leave this commit out.

Versioning: Error::Zip wraps the public ZipError of zip, so this changes the public API. calamine raised its minor version for the same upgrade (0.36 → 0.37); for pptx-to-md, that would be 2.0.0.

All 91 tests pass. MindWork AI Studio uses this branch through [patch.crates-io] until a release is out.

@0xnkr

0xnkr commented Oct 30, 2026

Copy link
Copy Markdown
Owner

Hi @SommerEngineering,

thank you for pointing out these security advisories and for taking the time to prepare this pull request. The description is clear and well-structured, and I appreciate that you went through the affected advisories individually and assessed their practical impact on this crate.

I have reviewed the changes and verified them locally: the build, clippy, and the full test suite pass. Restricting zip to deflate is a sensible choice, as PPTX and ODP files do not require any other compression methods.

I agree with your assessment regarding versioning. Since Error::Zip exposes the ZipError type, I will release these changes as version 2.0.0. I am going to use this major release to make a few further adjustments to the public error type, and I will publish the new version shortly after merging.

Thank you again for your contribution 😃

@codecov

codecov Bot commented Oct 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@0xnkr
0xnkr merged commit 77874e5 into 0xnkr:main Oct 30, 2026
2 checks passed
@0xnkr 0xnkr mentioned this pull request Oct 30, 2026
@SommerEngineering
SommerEngineering deleted the zip-9 branch October 31, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants